%%%NNR
NUMBER=50;
x=[0.5,0.5];
for i=1:NUMBER-1
    x=[x;rand(1,2)];    %standard uniform distribution
end

for i=2:NUMBER
    length=1000;
    num=0;
    for j=i:NUMBER
        if (x(j,1)-x(i-1,1))^2+(x(j,2)-x(i-1,2))^2  <length
            length = (x(j,1)-x(i-1,1))^2+(x(j,2)-x(i-1,2))^2  ;
            num = j;
        end
    end
    tmp = x(i,:);
    x(i,:)=x(num,:);
    x(num,:)=tmp;
end
 [A,V,inputSize]=generateSimpleConnection(x)
 plotSimpleNetwork( A,V,inputSize)